3.54 \(\int \sec ^6(c+d x) (a \cos (c+d x)+b \sin (c+d x))^2 \, dx\)

Optimal. Leaf size=85 \[ \frac {\left (a^2+b^2\right ) \tan ^3(c+d x)}{3 d}+\frac {a^2 \tan (c+d x)}{d}+\frac {a b \tan ^4(c+d x)}{2 d}+\frac {a b \tan ^2(c+d x)}{d}+\frac {b^2 \tan ^5(c+d x)}{5 d} \]

[Out]

a^2*tan(d*x+c)/d+a*b*tan(d*x+c)^2/d+1/3*(a^2+b^2)*tan(d*x+c)^3/d+1/2*a*b*tan(d*x+c)^4/d+1/5*b^2*tan(d*x+c)^5/d

________________________________________________________________________________________

Rubi [A]  time = 0.08, antiderivative size = 85, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 28, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.071, Rules used = {3088, 894} \[ \frac {\left (a^2+b^2\right ) \tan ^3(c+d x)}{3 d}+\frac {a^2 \tan (c+d x)}{d}+\frac {a b \tan ^4(c+d x)}{2 d}+\frac {a b \tan ^2(c+d x)}{d}+\frac {b^2 \tan ^5(c+d x)}{5 d} \]

Antiderivative was successfully verified.

[In]

Int[Sec[c + d*x]^6*(a*Cos[c + d*x] + b*Sin[c + d*x])^2,x]

[Out]

(a^2*Tan[c + d*x])/d + (a*b*Tan[c + d*x]^2)/d + ((a^2 + b^2)*Tan[c + d*x]^3)/(3*d) + (a*b*Tan[c + d*x]^4)/(2*d
) + (b^2*Tan[c + d*x]^5)/(5*d)

Rule 894

Int[((d_.) + (e_.)*(x_))^(m_)*((f_.) + (g_.)*(x_))^(n_)*((a_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Int[ExpandIn
tegrand[(d + e*x)^m*(f + g*x)^n*(a + c*x^2)^p, x], x] /; FreeQ[{a, c, d, e, f, g}, x] && NeQ[e*f - d*g, 0] &&
NeQ[c*d^2 + a*e^2, 0] && IntegerQ[p] && ((EqQ[p, 1] && IntegersQ[m, n]) || (ILtQ[m, 0] && ILtQ[n, 0]))

Rule 3088

Int[cos[(c_.) + (d_.)*(x_)]^(m_.)*(cos[(c_.) + (d_.)*(x_)]*(a_.) + (b_.)*sin[(c_.) + (d_.)*(x_)])^(n_), x_Symb
ol] :> -Dist[d^(-1), Subst[Int[(x^m*(b + a*x)^n)/(1 + x^2)^((m + n + 2)/2), x], x, Cot[c + d*x]], x] /; FreeQ[
{a, b, c, d}, x] && IntegerQ[n] && IntegerQ[(m + n)/2] && NeQ[n, -1] &&  !(GtQ[n, 0] && GtQ[m, 1])

Rubi steps

\begin {align*} \int \sec ^6(c+d x) (a \cos (c+d x)+b \sin (c+d x))^2 \, dx &=-\frac {\operatorname {Subst}\left (\int \frac {(b+a x)^2 \left (1+x^2\right )}{x^6} \, dx,x,\cot (c+d x)\right )}{d}\\ &=-\frac {\operatorname {Subst}\left (\int \left (\frac {b^2}{x^6}+\frac {2 a b}{x^5}+\frac {a^2+b^2}{x^4}+\frac {2 a b}{x^3}+\frac {a^2}{x^2}\right ) \, dx,x,\cot (c+d x)\right )}{d}\\ &=\frac {a^2 \tan (c+d x)}{d}+\frac {a b \tan ^2(c+d x)}{d}+\frac {\left (a^2+b^2\right ) \tan ^3(c+d x)}{3 d}+\frac {a b \tan ^4(c+d x)}{2 d}+\frac {b^2 \tan ^5(c+d x)}{5 d}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.19, size = 54, normalized size = 0.64 \[ \frac {(a+b \tan (c+d x))^3 \left (a^2-3 a b \tan (c+d x)+6 b^2 \tan ^2(c+d x)+10 b^2\right )}{30 b^3 d} \]

Antiderivative was successfully verified.

[In]

Integrate[Sec[c + d*x]^6*(a*Cos[c + d*x] + b*Sin[c + d*x])^2,x]

[Out]

((a + b*Tan[c + d*x])^3*(a^2 + 10*b^2 - 3*a*b*Tan[c + d*x] + 6*b^2*Tan[c + d*x]^2))/(30*b^3*d)

________________________________________________________________________________________

fricas [A]  time = 0.67, size = 79, normalized size = 0.93 \[ \frac {15 \, a b \cos \left (d x + c\right ) + 2 \, {\left (2 \, {\left (5 \, a^{2} - b^{2}\right )} \cos \left (d x + c\right )^{4} + {\left (5 \, a^{2} - b^{2}\right )} \cos \left (d x + c\right )^{2} + 3 \, b^{2}\right )} \sin \left (d x + c\right )}{30 \, d \cos \left (d x + c\right )^{5}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)^6*(a*cos(d*x+c)+b*sin(d*x+c))^2,x, algorithm="fricas")

[Out]

1/30*(15*a*b*cos(d*x + c) + 2*(2*(5*a^2 - b^2)*cos(d*x + c)^4 + (5*a^2 - b^2)*cos(d*x + c)^2 + 3*b^2)*sin(d*x
+ c))/(d*cos(d*x + c)^5)

________________________________________________________________________________________

giac [A]  time = 0.58, size = 80, normalized size = 0.94 \[ \frac {6 \, b^{2} \tan \left (d x + c\right )^{5} + 15 \, a b \tan \left (d x + c\right )^{4} + 10 \, a^{2} \tan \left (d x + c\right )^{3} + 10 \, b^{2} \tan \left (d x + c\right )^{3} + 30 \, a b \tan \left (d x + c\right )^{2} + 30 \, a^{2} \tan \left (d x + c\right )}{30 \, d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)^6*(a*cos(d*x+c)+b*sin(d*x+c))^2,x, algorithm="giac")

[Out]

1/30*(6*b^2*tan(d*x + c)^5 + 15*a*b*tan(d*x + c)^4 + 10*a^2*tan(d*x + c)^3 + 10*b^2*tan(d*x + c)^3 + 30*a*b*ta
n(d*x + c)^2 + 30*a^2*tan(d*x + c))/d

________________________________________________________________________________________

maple [A]  time = 1.97, size = 82, normalized size = 0.96 \[ \frac {-a^{2} \left (-\frac {2}{3}-\frac {\left (\sec ^{2}\left (d x +c \right )\right )}{3}\right ) \tan \left (d x +c \right )+\frac {a b}{2 \cos \left (d x +c \right )^{4}}+b^{2} \left (\frac {\sin ^{3}\left (d x +c \right )}{5 \cos \left (d x +c \right )^{5}}+\frac {2 \left (\sin ^{3}\left (d x +c \right )\right )}{15 \cos \left (d x +c \right )^{3}}\right )}{d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sec(d*x+c)^6*(a*cos(d*x+c)+b*sin(d*x+c))^2,x)

[Out]

1/d*(-a^2*(-2/3-1/3*sec(d*x+c)^2)*tan(d*x+c)+1/2*a*b/cos(d*x+c)^4+b^2*(1/5*sin(d*x+c)^3/cos(d*x+c)^5+2/15*sin(
d*x+c)^3/cos(d*x+c)^3))

________________________________________________________________________________________

maxima [A]  time = 0.34, size = 70, normalized size = 0.82 \[ \frac {10 \, {\left (\tan \left (d x + c\right )^{3} + 3 \, \tan \left (d x + c\right )\right )} a^{2} + 2 \, {\left (3 \, \tan \left (d x + c\right )^{5} + 5 \, \tan \left (d x + c\right )^{3}\right )} b^{2} + \frac {15 \, a b}{{\left (\sin \left (d x + c\right )^{2} - 1\right )}^{2}}}{30 \, d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)^6*(a*cos(d*x+c)+b*sin(d*x+c))^2,x, algorithm="maxima")

[Out]

1/30*(10*(tan(d*x + c)^3 + 3*tan(d*x + c))*a^2 + 2*(3*tan(d*x + c)^5 + 5*tan(d*x + c)^3)*b^2 + 15*a*b/(sin(d*x
 + c)^2 - 1)^2)/d

________________________________________________________________________________________

mupad [B]  time = 0.62, size = 98, normalized size = 1.15 \[ \frac {\frac {b^2\,\sin \left (c+d\,x\right )}{5}+{\cos \left (c+d\,x\right )}^2\,\left (\frac {a^2\,\sin \left (c+d\,x\right )}{3}-\frac {b^2\,\sin \left (c+d\,x\right )}{15}\right )+{\cos \left (c+d\,x\right )}^4\,\left (\frac {2\,a^2\,\sin \left (c+d\,x\right )}{3}-\frac {2\,b^2\,\sin \left (c+d\,x\right )}{15}\right )+\frac {a\,b\,\cos \left (c+d\,x\right )}{2}}{d\,{\cos \left (c+d\,x\right )}^5} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a*cos(c + d*x) + b*sin(c + d*x))^2/cos(c + d*x)^6,x)

[Out]

((b^2*sin(c + d*x))/5 + cos(c + d*x)^2*((a^2*sin(c + d*x))/3 - (b^2*sin(c + d*x))/15) + cos(c + d*x)^4*((2*a^2
*sin(c + d*x))/3 - (2*b^2*sin(c + d*x))/15) + (a*b*cos(c + d*x))/2)/(d*cos(c + d*x)^5)

________________________________________________________________________________________

sympy [F(-1)]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)**6*(a*cos(d*x+c)+b*sin(d*x+c))**2,x)

[Out]

Timed out

________________________________________________________________________________________